package com.cvpoc.model;

import java.io.Serializable;
import java.util.Set;

public class Collaborateur implements Serializable {
	private static final long serialVersionUID = -2154388876773783840L;

	private int id;
	private String nom;
	private String prenom;
	private String practice;
	private String role;
	private Set<CollaborateurLangue> collaborateurLangue;
	private Set<CollaborateurCertification> collaborateurCertifications;
	private Set<FormationInitiale> formationsInitiales;
	private Set<FormationProfessionnelle> formationsProfessionnelles;
	private Set<Experience> experiences;

	public Collaborateur(String nom, String prenom, String practice, String role) {
		this.nom = nom;
		this.prenom = prenom;
		this.practice = practice;
		this.role = role;
	}

	public Collaborateur() {
		super();
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getNom() {
		return nom;
	}

	public void setNom(String nom) {
		this.nom = nom;
	}

	public String getPrenom() {
		return prenom;
	}

	public void setPrenom(String prenom) {
		this.prenom = prenom;
	}

	public String getPractice() {
		return practice;
	}

	public void setPractice(String pratice) {
		this.practice = pratice;
	}

	public String getRole() {
		return role;
	}

	public void setRole(String role) {
		this.role = role;
	}

	public Set<FormationInitiale> getFormationsInitiales() {
		return formationsInitiales;
	}

	public void setFormationsInitiales(
			Set<FormationInitiale> formationsInitiales) {
		this.formationsInitiales = formationsInitiales;
	}

	public Set<FormationProfessionnelle> getFormationsProfessionnelles() {
		return formationsProfessionnelles;
	}

	public void setFormationsProfessionnelles(
			Set<FormationProfessionnelle> formationsProfessionnelles) {
		this.formationsProfessionnelles = formationsProfessionnelles;
	}

	public Set<CollaborateurCertification> getCollaborateurCertifications() {
		return collaborateurCertifications;
	}

	public void setCollaborateurCertifications(
			Set<CollaborateurCertification> collaborateurCertifications) {
		this.collaborateurCertifications = collaborateurCertifications;
	}

	public Set<CollaborateurLangue> getCollaborateurLangue() {
		return collaborateurLangue;
	}

	public void setCollaborateurLangue(
			Set<CollaborateurLangue> collaborateurLangue) {
		this.collaborateurLangue = collaborateurLangue;
	}

	public Set<Experience> getExperiences() {
		return experiences;
	}

	public void setExperiences(Set<Experience> experiences) {
		this.experiences = experiences;
	}

	@Override
	public String toString() {
		return "Collaborateur [id=" + id + ", nom=" + nom + ", prenom="
				+ prenom + ", practice=" + practice + ", role=" + role + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + id;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Collaborateur other = (Collaborateur) obj;
		if (id != other.id)
			return false;
		return true;
	}

}
